from setuptools import setup, find_packages
import os

# 读取 README 文件
def read_readme():
    with open("README.md", "r", encoding="utf-8") as fh:
        return fh.read()

# 确保包含前端文件
def get_package_data():
    return {
        'smart_server': [
            'src/frontend/dist/*',
            'src/frontend/dist/**/*',
            'src/frontend/dist/assets/*',
            'src/frontend/dist/assets/**/*',
        ],
    }

setup(
    name="smart-code",
    version="0.1.0",
    author="Jan",
    author_email="your.email@example.com",
    description="A smart server with decision tree generation capabilities",
    long_description=read_readme(),
    long_description_content_type="text/markdown",
    url="https://github.com/yourusername/smart-code",
    packages=find_packages(),
    include_package_data=True,
    package_data=get_package_data(),
    install_requires=[
        "fastapi>=0.104.1",
        "uvicorn>=0.24.0",
        "httpx>=0.25.2",
        "python-multipart>=0.0.6",
        "aiofiles>=23.2.1",
        "pydantic>=2.0.0",
        "graphviz>=0.21",
        "pandas>=2.3.1",
    ],
    python_requires=">=3.8",
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: 3.12",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Framework :: FastAPI",
    ],
    entry_points={
        "console_scripts": [
            "smart-server=smart_server.server:main",
        ],
    },
    keywords="decision-tree, fastapi, server, machine-learning, optimization",
    project_urls={
        "Bug Reports": "https://github.com/yourusername/smart-code/issues",
        "Source": "https://github.com/yourusername/smart-code",
        "Documentation": "https://github.com/yourusername/smart-code#readme",
    },
)
